<h2>Upload a new photo of Article <%=Article.find(params[:article_id]).title%></h2>

<%= error_messages_for :photo %>

<% form_for(:photo, 
            :url => article_photos_path(:article_id => params[:article_id]), 
            :html => { :multipart => true }) do |f| %>
  <p>Select a photo to upload</p>
  <p>Title:<br /><%= f.text_field 'title' %></p>
  <p>Description:<br /><%= f.text_area 'body', :rows => 6, :cols => 40 %></p>
  <p>Photo:<br /><%= f.file_field 'uploaded_data' %></p>
  <p>
    <%= submit_tag 'Upload Photo' %> or 
    <%= link_to 'cancel', article_photos_path(params[:article_id]) %>
  </p>
<% end %>
